package com.keon.jianbao.enu;

import com.keon.jianbao.R;

/**
 * Created by keon on 15/9/6.
 */
public enum MyInfoEdit {

    NAME(999, R.string.my_info_name),
    HOBBY(998, R.string.my_info_hobby),
    ADDRESS(997, R.string.my_info_address),
    MOBILE(996, R.string.my_info_mobile);

    int id;
    int title;

    MyInfoEdit(int id, int title) {
        this.id = id;
        this.title = title;
    }

    public int getId() {
        return id;
    }

    public int getTitle() {
        return title;
    }

    public static int getTitle(int id) {
        for (MyInfoEdit c : MyInfoEdit.values()) {
            if (c.getId() == id) {
                return c.getTitle();
            }
        }
        return 0;
    }
}
